package com.zfh.cloud.apis;

import com.zfh.cloud.pojo.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Created by 小可乐$ on 2024/9/14$ 13:52$
 * description:FeignClient的声明式接口，方便外接调用
 */
@FeignClient(value = "cloud-order")
public interface OrderFeignClient {
    /**
     * user表查询order表
     * 根据user表的userid查询order表
     * */
    @GetMapping("order/getOrder/{userId}")
    public Order findOrderByUserId(@PathVariable(value = "userId") Long userId);
}
